//
//  FirmwareUpdateView.swift
//  Kosspot
//
//  Created by 李鑫 on 2025/7/15.
//

import SwiftUI

struct FirmwareUpdateView: View {
    var body: some View {
        VStack {
            CustomNavigationBar(rightImageName: nil, title: "固件升级") {}
            Image("update")
                .resizable()
                .frame(width: 166,height: 166)
                .padding(.top,56)
            
            VStack(alignment: .leading, spacing: 8) {
                HStack {
                    Text("MOY-JZY2-2.0.2").font(.system(size: 16)).foregroundStyle(.white)
                    Spacer()
                }
                .frame(height: 16)
                .padding(.horizontal,16)
                
                HStack {
                    Text("设备编码：7F:17:21:A4:6C:54").font(.system(size: 14)).foregroundStyle(Color(hex: "#B1B1B1"))
                    Spacer()
                }
                .frame(height: 14)
                .padding(.horizontal,16)
            }
            .frame(height: 70)
            .background(Color(hex: "#1E1E1E"))
            .cornerRadius(16)
            .padding(.horizontal,12)
            
            
            Spacer()
            HStack {
                Button {
                    
                    
                } label: {
                    Text("更新")
                        .font(.system(size: 16))
                        .foregroundStyle(Color(hex: "#242424"))
                }
            }
            .frame(maxWidth: .infinity, alignment: .center)
            .frame(height: 44)
            .gradientBackground(colors: [Color(hex: "#00F3AF"),Color(hex: "#00E9DA")], type: .linear(start: .leading, end: .trailing), cornerRadius: 22.0)
            .padding(.horizontal,12)
            .padding(.bottom,20)
        }.navigationBarHidden(true)
            .background(Color(hex: "#0A0A0A"))
            .edgesIgnoringSafeArea(.all)
    }
}

#Preview {
    FirmwareUpdateView()
}
